package com.minimalist.common.entity.lindi.po;

import com.mybatisflex.annotation.Table;

import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * 林地指标平台_购买记录文件表 实体类。
 *
 * @author 11987
 * @since 2025-05-21
 */
@Table(value = "LINDI_PURCHASE_INDEX_RECORD_FILE")
public class LindiPurchaseIndexRecordFile implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 购买指标记录ID
     */
    private Long purchaseIndexRecordId;

    /**
     * 文件ID
     */
    private Long fileId;

    // 无参构造函数
    public LindiPurchaseIndexRecordFile() {
    }

    // 全参构造函数
    public LindiPurchaseIndexRecordFile(Long purchaseIndexRecordId, Long fileId) {
        this.purchaseIndexRecordId = purchaseIndexRecordId;
        this.fileId = fileId;
    }

    // Getter和Setter方法
    public Long getPurchaseIndexRecordId() {
        return purchaseIndexRecordId;
    }

    public void setPurchaseIndexRecordId(Long purchaseIndexRecordId) {
        this.purchaseIndexRecordId = purchaseIndexRecordId;
    }

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LindiPurchaseIndexRecordFile that = (LindiPurchaseIndexRecordFile) o;
        return Objects.equals(purchaseIndexRecordId, that.purchaseIndexRecordId) &&
               Objects.equals(fileId, that.fileId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(purchaseIndexRecordId, fileId);
    }

    @Override
    public String toString() {
        return "LindiPurchaseIndexRecordFile{" +
                "purchaseIndexRecordId=" + purchaseIndexRecordId +
                ", fileId=" + fileId +
                '}';
    }

    // Builder类
    public static class Builder {
        private Long purchaseIndexRecordId;
        private Long fileId;

        public Builder purchaseIndexRecordId(Long purchaseIndexRecordId) {
            this.purchaseIndexRecordId = purchaseIndexRecordId;
            return this;
        }

        public Builder fileId(Long fileId) {
            this.fileId = fileId;
            return this;
        }

        public LindiPurchaseIndexRecordFile build() {
            return new LindiPurchaseIndexRecordFile(purchaseIndexRecordId, fileId);
        }
    }

    public static Builder builder() {
        return new Builder();
    }

}
